<extend name="Public:base" />

<block name="content">	
	
<table class="table table-striped table-bordered table-hover search-form">
	<thead>
		<th><input name="order_num" type="text" placeholder="输入售后单号" value="{:I('return_num')}" /></th>
		<th><input name="user_name" type="text" placeholder="输入会员名" value="{:I('user_name')}" /></th>		
		<th>    				
			<select name="status">
				<option value="">-选择状态-</option>
				<option value="7">待审核</option>
				<option value="8">审核不通过</option>
				<option value="9">审核通过</option>
				<!--<option value="10">退货中</option>
				<option value="11">退款中</option>-->
				<option value="12">确认退款</option>
				<option value="13">已取消</option>
			</select>
		</th>
		<th>
			<a class="btn btn-primary" href="javascript:;" id="search" url="{:U('ReturnOrder/index')}">查询</a>
		</th>
	</thead>
</table>	
	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>ID</th>
						<th>售后单号</th>
                        <th>订单号</th>
						<th>价格</th>
						<th>会员名</th>					
						<th>状态</th>	
						<th>申请时间</th>
						<th>操作</th>				
					</tr>
				</thead>
				<tbody>
						<volist name="list" id="v" empty="$empty">
						<tr>						
							<td>{$v.id}</td>
                            <td>{$v.return_num}</td>
							<td>{$v.order_num}</td>
							<td>{$v.price}</td>

							<td>{$v.user_name}</td>
							<td>{$v.status_text}</td>
							<td>
								<?php echo date('Y-m-d H:i:s',$v['create_time']); ?>
							</td>
							<td>
								<a  class="btn btn-xs btn-info" href='{:U("ReturnOrder/show_order",array("id"=>$v["id"]))}'>
									<i class="icon-eye-open bigger-120"></i>
								</a> 
								
								<a  class="btn btn-xs btn-info" href='{:U("Order/print_order",array("id"=>$v["order_id"]))}'>
									<i class="icon-print bigger-120"></i>
								</a>

								<!--<a class="delete btn btn-xs btn-danger" href='{:U("Order/del",array("id"=>$v["order_id"]))}' >
									<i class="icon-trash bigger-120"></i>
								</a>-->
							</td>
						</tr>
						</volist>	
						
						<tr>
							<td colspan="20" class="page">{$page}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
</block>
<block name="javascript">
<script>	
$(function(){
   $("#search").click(function () {
        var url = $(this).attr('url');
        var query = $('.search-form').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    });	
});
</script>
</block>